package vip.housir.kotlindemo

import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.runApplication
import org.springframework.cache.annotation.EnableCaching

@SpringBootApplication
@EnableCaching
class KotlinDemoApplication {
//    @Bean
//    fun fastJsonHttpMessageConverters(): HttpMessageConverters {
//        //定义一个convert转换消息的对象
//        val fastConverter = FastJsonHttpMessageConverter()
//        //添加fastjson的配置信息
//        val fastJsonConfig = FastJsonConfig()
//        fastJsonConfig.setSerializerFeatures(SerializerFeature.PrettyFormat)
//        //在convert中添加配置信息
//        fastConverter.fastJsonConfig = fastJsonConfig
//        //将convert添加到converters中
//        return HttpMessageConverters(fastConverter)
//    }
}

fun main(args: Array<String>) {
    runApplication<KotlinDemoApplication>(*args)
}
